<div class="menu">
	<div align="right" style="font-weight:bold; font-size:12px; padding-bottom:8px; color:#0858A2;">
		<?php echo $this->Access->getMyRole($this->Access->getMy('group_id')).": ".$this->Access->getMy('nombre_completo');?>
	</div>
	<?php  $this->Form->cuenta($this->Access->getMy('id'));?>	
	<div class="desplegable">
		<?php  $this->Form->menu($this->Access->getMy('id'),$this->Access->getMy('group_id'));?>
	</div>
</div>
<div class="posts index">
<fieldset>
	<legend><?php __('Posts');?></legend>	
	<ul>
		<li><?php echo $this->Html->link(__('Nuevo Post', true), array('action' => 'add')); ?></li>
	</ul>
	<table class="tabla_formulario" cellpadding="0" cellspacing="0">
	<tr>		
			<th><?php echo $this->Paginator->sort('titulo');?></th>
			<th><?php echo $this->Paginator->sort('contenido');?></th>
			<th><?php echo $this->Paginator->sort('Creada','Post.created');?></th>
			<th><?php echo $this->Paginator->sort('Modificada','Post.modified');?></th>
			<th class="actions"><?php __('');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($posts as $post):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $post['Post']['titulo']; ?>&nbsp;</td>
		<td><?php echo $post['Post']['contenido']; ?>&nbsp;</td>
		<td><?php echo $post['Post']['created']; ?>&nbsp;</td>
		<td><?php echo $post['Post']['modified']; ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('Editar', true), array('action' => 'edit', $post['Post']['id'])); ?>
			<?php echo $this->Html->link(__('Eliminar', true), array('action' => 'delete', $post['Post']['id']), null, sprintf(__('Desea eliminar el Post %s?', true), $post['Post']['titulo'])); ?>
		</td>
	</tr>
   <?php endforeach; ?>    
	</table>
	</fieldset>
	<p>
		<?php echo $this->Paginator->counter(array('format' => __('P&aacute;gina %page% de %pages%,mostrando %current% regristros de  un total de %count%,
		   empieza con el registro %start%, termina en %end%', true)));?>
	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Anterior', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Siguiente', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>	
	
